package com.czg.designmode.factory.abstracts;

/**
 * 女人的衣柜里面的东西枚举类
 *
 * @author chenzhigang
 */

@SuppressWarnings("AlibabaEnumConstantsMustHaveComment")
public enum WomenEnum {
    BOOT("boot", "靴子", new WomenBoot()),
    ;

    private String type;

    private String desc;

    private WomenCloset womenCloset;

    WomenEnum() {
    }

    WomenEnum(String type, String desc, WomenCloset womenCloset) {
        this.type = type;
        this.desc = desc;
        this.womenCloset = womenCloset;
    }

    /**
     * 根据女人衣柜里面东西的类型获取衣柜
     *
     * @param type 衣柜里面东西的类型
     * @return 衣柜
     */
    public static WomenCloset getClosetByType(String type) {
        for (WomenEnum womenEnum : WomenEnum.values()) {
            if (womenEnum.getType().equals(type)) {
                return womenEnum.getWomenCloset();
            }
        }
        return null;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public WomenCloset getWomenCloset() {
        return womenCloset;
    }

    public void setWomenCloset(WomenCloset womenCloset) {
        this.womenCloset = womenCloset;
    }
}
